package edu.ptu.communityplatform.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.ptu.communityplatform.domain.entity.Area;
import edu.ptu.communityplatform.domain.vos.AreaVos;
import edu.ptu.communityplatform.domain.vos.ProvVos;
import edu.ptu.communityplatform.mapper.AreaMapper;
import edu.ptu.communityplatform.service.IAreaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @BelongsProject: communityPlatform
 * @BelongsPackage: edu.ptu.communityplatform.service.impl
 * @Author: HYJ
 * @CreateTime: 2025-04-09  23:59
 * @Description: TODO
 * @Version: 1.0
 */
@Service("areaService")
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements IAreaService {

    @Resource
    private AreaMapper areaMapper;

    /**
     * 获取所有的省和市区信息
     * 省：市：区
     *
     * @return
     */
    @Override
    public List<ProvVos> getAreaList() {
        return areaMapper.getProvs();
    }
}
